1. Field of the Invention
The present invention relates generally to an improved data processing system, and in particular, to a computer implemented method, data processing system, and computer program product for providing a generic sequencing service for ordering processing requests in a business integration environment.
2. Description of the Related Art
The integration of business processes across organizations allows individuals and systems both internal and external to an enterprise to communicate and work together in support of business strategies. Clients may call out a service in the business enterprise, and the appropriate business component in the business enterprise responds to the request. A client may issue a synchronous request, meaning that the client issues the request for a service and then suspends its processing while waiting for a response. In this manner, the client controls the order or sequence of the requests, since the client will not initiate the next request until the previous request has been processed. However, it is common in business integration environments that requests are batched together asynchronously, or in parallel. With an asynchronous request, the client issues a request for a service and then resumes its processing without waiting for a response from the business component. The service handles the client request and returns a response at a later time, at which time the client retrieves the response and proceeds with its processing.
For example, a client may issue requests to a target component which comprise a set of changes to be made, which are passed along asynchronously via, for example, a message queue (MQ). To correctly process these asynchronous requests, the service must observe the order in which the requests are received, since two or more of the asynchronous requests may operate on the same target. Consider the example of a banking service which allows customers to make deposits, withdrawals, and check account information. For a given account, a customer may issue two asynchronous requests to modify an account—one to deposit $100 into the account, and one to withdraw $50 from the account. In this example, it may be important that the banking service processes the asynchronous requests in the order in which they are received (first deposit, then withdraw), so that funds will be available in the customer's account to withdraw. If the requests are not processed in sequence, adverse consequences may result, such as the customer incurring charges for having insufficient funds for the withdrawal.
Solutions in the current art provide for single-threading asynchronous requests in order to maintain the processing order, such that all requests received from clients are processed serially. Thus, processing order is maintained since the service receiving all of the requests must provide a response to the first request before responding to the next request. Although serial processing allows one to maintain the processing order, it is not scalable. Thus, although the current art allows one to guarantee the processing order of requests, it does not, however, allow for adapting to increased demands on the system and provide scalability.
Therefore, it would be advantageous to have an improved system and method for ensuring that the order in which requests are processed is preserved in a scalable business integration environment.